#pragma once
#include "afxwin.h"

#include "TextProgressCtrl.h"

// CMicroDlg dialog
#define  HAPPY_DELAY_COUNT 10   // delay time for chang sad icon to happy icon

class CMicroDlg : public CDialog
{
	DECLARE_DYNAMIC(CMicroDlg)

public:
	CMicroDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CMicroDlg();

// Dialog Data
	enum { IDD = IDD_DLG_MICRO };

    int m_iWorkedTime;
    int m_iBreakTime;

    void SetParameter(int work, int TmBeak);
	
	int m_iOneSecondTimer;      // 1 second clock
	int m_iMouseMoveCheckTimer;      // .3 second clock
	int m_iPassSecond; // pass time.
	int m_iResolutionX;    //  screen resolution width
	int m_iResolutionY;    // screen resolution height

	int m_iDlgWidth;
	int m_idlgHeight;
	int m_iCurX;
	int m_iCurY;
	int m_iHappyDelay;

	CRect  m_cDlgRc;  
	CPoint m_cMousePosition;
	HICON m_hIconHappy;
	HICON m_hIconSad;

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();

	DECLARE_MESSAGE_MAP()
	virtual void OnCancel();
	virtual void OnOK();
	CTextProgressCtrl	m_ProgressFade;

public:
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	BOOL MouseInDlg();
	// icon happy or sad
	CStatic m_cIconHappy;
};
